
package com.bei_en.teacher.management.web;

public class MyJsonResult {

    public MyJsonResult(int statusCode) {

	this.statusCode = statusCode;
    }

    protected int statusCode;// ok = 200, error = 300, timeout = 301
    protected String message;
    protected String tabid;// 多个id以英文逗号分隔开，当前的navtab
			   // id不需要填写，填写后可能会导致当前navtab重复刷新。
    protected String dialogid;// 要控制刷新当前dialog，请设置dialog中表单的reload参数。
    protected String divid;// 要控制刷新当前div，请设置该div中表单的reload参数。
    protected boolean closeCurrent;// 是否关闭当前窗口(navtab或dialog)。
    protected String forward;// 跳转到某个url。
    protected String forwardConfirm;// 跳转url前的确认提示信息。

    @Override
    public String toString() {

	StringBuilder builder = new StringBuilder();
	builder.append("MyJsonResult [statusCode=").append(statusCode).append(", ");
	if (message!=null)
	    builder.append("message=").append(message).append(", ");
	if (tabid!=null)
	    builder.append("tabid=").append(tabid).append(", ");
	if (dialogid!=null)
	    builder.append("dialogid=").append(dialogid).append(", ");
	if (divid!=null)
	    builder.append("divid=").append(divid).append(", ");
	builder.append("closeCurrent=").append(closeCurrent).append(", ");
	if (forward!=null)
	    builder.append("forward=").append(forward).append(", ");
	if (forwardConfirm!=null)
	    builder.append("forwardConfirm=").append(forwardConfirm);
	builder.append("]");
	return builder.toString();
    }

    public int getStatusCode() {

	return statusCode;
    }

    public void setStatusCode(int statusCode) {

	this.statusCode = statusCode;
    }

    public String getMessage() {

	return message;
    }

    public void setMessage(String message) {

	this.message = message;
    }

    public String getTabid() {

	return tabid;
    }

    public void setTabid(String tabid) {

	this.tabid = tabid;
    }

    public String getDialogid() {

	return dialogid;
    }

    public void setDialogid(String dialogid) {

	this.dialogid = dialogid;
    }

    public String getDivid() {

	return divid;
    }

    public void setDivid(String divid) {

	this.divid = divid;
    }

    public boolean isCloseCurrent() {

	return closeCurrent;
    }

    public void setCloseCurrent(boolean closeCurrent) {

	this.closeCurrent = closeCurrent;
    }

    public String getForward() {

	return forward;
    }

    public void setForward(String forward) {

	this.forward = forward;
    }

    public String getForwardConfirm() {

	return forwardConfirm;
    }

    public void setForwardConfirm(String forwardConfirm) {

	this.forwardConfirm = forwardConfirm;
    }
}